<h1><%= "#{t(:listing)} #{t(:treatments)}" %></h1>

<table>
  <thead>
    <tr>
      <th><%= t :appointment %></th>
      <th><%= t :treatment_group %></th>
      <th><%= t :fee %></th>
      <th colspan="3"></th>
    </tr>
  </thead>

  <tbody>
    <% @treatments.each do |treatment| %>
      <tr>
        <td><%= treatment.appointment.patient.full_name %></td>
        <td><%= treatment.treatment_group.label %></td>
        <td><%= treatment.fee %></td>
        <td><%= link_to "#{t(:show)}", treatment %></td>
        <td><%= link_to "#{t(:edit)}", edit_treatment_path(treatment) %></td>
        <td><%= link_to "#{t(:destroy)}", treatment, method: :delete, data: { confirm: 'Are you sure?' } %></td>
      </tr>
    <% end %>
  </tbody>
</table>

<br>

<%= link_to "#{t(:new_treatment)}", new_treatment_path %>
